package byx.container.annotation.WrapTest;

import byx.container.annotation.annotation.Register;
import byx.container.annotation.annotation.Wrap;
import java.util.function.Function;

@Register
@Wrap(Wrapper.class)
public class A {
    public int handle1(String input) {
        return input.length();
    }

    public String handle2(String input) {
        return input + " aaa";
    }
}

class Wrapper implements Function<A, A> {
    @Override
    public A apply(A a) {
        return new A() {
            @Override
            public int handle1(String input) {
                return 123;
            }

            @Override
            public String handle2(String input) {
                return a.handle2(input) + " bbb";
            }
        };
    }
}
